<h1>Liste des villages Costa Brava</h1>

<table>
  <thead>
    <tr>
      <th>Id</th>
      <th>Nom village</th>
      <th>Desc pre village</th>
      <th>Desc village</th>
      <th>Geolatitud</th>
      <th>Geolongitud</th>
      <th>Slug</th>
	  <th>Visible</th>
	  <th>Last updated</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($villagess as $villages): ?>
    <tr>
      <td><a href="<?php echo url_for('villages/edit?id='.$villages->getId()) ?>"><?php echo $villages->getId() ?></a></td>
      <td><?php echo $villages->getNomVillage() ?></td>
      <td><?php echo substr($villages->getDescPreVillage(), 0, 40) ?></td>
      <td><?php echo htmlspecialchars_decode(substr($villages->getDescVillage(), 0, 40)) ?></td>
      <td><?php echo $villages->getGeolatitud() ?></td>
      <td><?php echo $villages->getGeolongitud() ?></td>
      <td><?php echo $villages->getSlug() ?></td>
	  <td><?php echo $villages->getVisible() ?></td>
	  <td><?php echo $villages->getUpdated_at() ?> by <?php echo $villages->getUpdated_by() ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  <a href="<?php echo url_for('villages/new') ?>">New</a>
